package com.ysd.lis.service.xm.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ysd.common.Result;
import com.ysd.lis.entity.xm.Template;
import com.ysd.lis.mapper.xm.TemplateMapper;
import com.ysd.lis.service.xm.XmReportTemplateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class XmReportTemplateServiceImpl implements XmReportTemplateService {

    @Resource
    TemplateMapper templateMapper;

    @Override
    public Result list() {
        List<Template> templates = templateMapper.selectList(new LambdaQueryWrapper<Template>().isNotNull(Template::getName));
        return Result.succ(templates);
    }
}
